package com.huanuo.internetofthings.service.impact;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.unicorn.framework.base.base.AbstractService;
import org.unicorn.framework.core.SysCode;
import org.unicorn.framework.core.exception.PendingException;

import com.huanuo.internetofthings.bo.impact.ImpactMonthStatistics;
import com.huanuo.internetofthings.dao.impact.ImpactMonthStatisticsMapper;

@Service
public class ImpactDeviceMonthStatisticsService extends AbstractService {

	@Autowired
	private ImpactMonthStatisticsMapper impactMonthStatisticsMapper;

	/**
	 * 查询设备月统计列表失败
	 * 
	 * @param impactDeviceStatistics
	 * @return
	 * @throws PendingException
	 */
	public List<ImpactMonthStatistics> getImpactMonthStatisticsList(ImpactMonthStatistics impactMonthStatistics)
			throws PendingException {
		try {
			return impactMonthStatisticsMapper.selectList(impactMonthStatistics);
		} catch (Exception e) {
			error("查询设备月统计列表失败", e);
			throw new PendingException(SysCode.DB_ERROR, "查询设备月统计列表失败");
		}
	}
}